public class Recursion {
    public static int rec (int n){
        if (n==1){
            return 1;
        }
        return n + rec(n-1);
    }
    public static void main(String[] args) {
        int n = 10;
        int ret = rec(n);
        System.out.println(ret);
    }
}
